
 FFA`bg(t[łƔגNIeB[̌cߍ݃`bg)
 by - NET-SOLEIL
 http://www.net-soleil.com/
 info@net-soleil.com

 Right-Bluezz

 T|[g
 http://bbs.net-soleil.com/1/

 {XNvg_E[hĒ܂Ƃɂ肪Ƃ܂B
 ̃XNvggpۂɂ͒ӎǂłgpĉB

 ӎ
 ẼXNvgʂĂ̔QɂĂ͈ؐӔC𕉂܂B
 ECGIݒu֎~̃T[o[ɐݒu邱Ƃ֎~܂B
 EĔzz邱Ƃ֎~܂B
 E쌠\L͕KĉB
 EoOȂǂ͎̎󂯕t܂A͎󂯕t܂B
 EǗl͗\Ŗ{XNvgCA폜\܂B

 p[~bV̐ݒ
 cgi-bin [777]
   |
   +--  @    / datalog/chatlog.cgi  [666]

 C
 2008/04/19 zzJn
 2008/06/07 [y[W܂

 ǉ&ύXꏊ

 ffadventure.iniJȉǉ
 # `bgOt@C
 $chat_file = "datalog/chatlog.cgi";
 # `bg\(ߍ݂Ȃ̂őƥ)
 $max_chat = 5;
 # RgőTCY
 $chat_size = 300;
 # `bgɃx\邩(Yes:1 NO:0)
 $clvh = 1;
 # tHgTCY(2)
 $fsize = 2;
 # IDł̃`bg(r炵΍)
 $shut_id[0] = "test";

 
 datalogchatlog.cgi쐬ȂƐɓ삵܂B
 $chat_file = "datalog/chatlog.cgi";

 # ǉꍇu$shut_id[1] = "(ID)";v̂悤ɂĂB
 $shut_id[0] = "test";

 ffadventure.ini̕ύX͈ȏ

 ffadventure.cgiJ
 ----------------------
 &log_in;
 #----------------#
 #  OC  #
 #----------------#
 ----------------------

 Ɉȉ㏑(dvȉȂƂȌۂH)B

 ----------------------
 if ($mode) { &$mode; }
 &log_in;
 exit;
 #----------------#
 #  OC  #
 #----------------#
 ----------------------

 ffadventure.cgi̕\(:`v\)Ɉȉǉ
 --------------------------------------------------------------------------------------------------
<form action="$script" method="post">
<input type="text" name="mes" size=100>
<input type=hidden name=id value=$chara[0]>
<input type="hidden" name=mydata value="$chara_log">
<input type=hidden name=mode value=chat_message>
<input type=submit class=btn value="">
<input type=reset class=btn value="Zbg">
</form>
EOM

	open(IN,"$chat_file");
	@CHAT_LOG = <IN>;
	close(IN);

	$hit=0;$i=1;
	foreach(@CHAT_LOG){
		($hid,$hname,$htime,$hmessage,$hhost,$clv) = split(/<>/);
		if ($max_chat < $i) {
			last;
		}
		print <<"EOM";
<table><tr><td>
<font color="$text">
EOM
if(!$clvh) { print "<font size=\"$fsize\"><b>$hname</b>>>u$hmessagev$htime\</font>\n";
}else { print "<font size=\"$fsize\"><b>$hname(Lv.$clv)</b>>>u$hmessagev$htime\</font>\n"; }
	print <<"EOM";
</font></td>
</tr></table>
EOM
		$hit=1;$i++;
	}
	if(!$hit) { print "<hr size=0><font color=$text>bZ[W͂܂</font>\n"; }
	print <<"EOM";
 --------------------------------------------------------------------------------------------------

 ԉɈȉǉB

 --------------------------------------------------------------------------------------------------
 #--------------#
 #  bZ[W  #
 #--------------#
 sub chat_message {

	&chara_load;

	&chara_check;

	if($in{'mes'} eq "") {
		&error("bZ[WLĂ܂$back_form()");
	}

	&get_time(time());

	&get_host;

	&all_data_read;

	$now_mes = length($in{'mes'});

	foreach (@ban_word) {
		if(index($in{'mes'},$_) >= 0) {
			&error("\\͋֎~Ă܂");
		}
	}

	if ($now_mes > $chat_size) {
		&res("bZ[W܂Ip$mes_size܂łłI(ݕF$now_mes)<br>");
	}

	foreach (@shut_id) {
		$_ =~ s/\*/\.\*/g;
		if ($in{'id'} =~ /$_/) {
			&error("֎~Ă܂");
		}
	}

	$lock_file = "$lockfolder/messa$in{'id'}.lock";
	&lock($lock_file,'MS');
	open(IN,"$chat_file");
	@chat_mes = <IN>;
	close(IN);

	$mes_sum = @chat_mes;

	if($mes_sum > $mes_max) { pop(@chat_mes); }

	unshift(@chat_mes,"$chara[0]<>$chara[4]<>$gettime<>$in{'mes'}<>$host<>$chara[18]<>\n");

	open(OUT,">$chat_file");
	print OUT @chat_mes;
	close(OUT);
	&unlock($lock_file,'MS');

	&header;

	print <<"EOM";
 <h1>[܂B</h1>
 <hr size=0>
 <form action="$script" method="post">
 <input type="hidden" name="id" value="$chara[0]">
 <input type="hidden" name="mydata" value="$chara_log">
 <input type=submit class=btn value="Xe[^Xʂ">
 </form>
 EOM

	&footer;

	exit;
 }
 --------------------------------------------------------------------------------------------------

 ܂([mF{^\ڃgbvցEEE)

 ܂A[mF{^(ĂȂl͖)Affadventure.cgíu&header;v̏ӂɉLǉ

 --------------------------------------------------------------------------------------------------
	&all_data_read;

	&get_time(time());

	if($in{'chat_time'}){
		if($in{'mes'} eq "") {
			&error("bZ[WLĂ܂$back_form");
		}

		$now_mes = length($in{'mes'});

		foreach (@ban_word) {
			if(index($in{'mes'},$_) >= 0) {
				&error("\\͋֎~Ă܂");
			}
		}

		if ($now_mes > $chat_size) {
			&res("bZ[W܂Ip$mes_size܂łłI(ݕF$now_mes)<br>");
		}

		foreach (@shut_id) {
			$_ =~ s/\*/\.\*/g;
			if ($in{'id'} =~ /$_/) {
				&error("֎~Ă܂");
			}
		}

		$lock_file = "$lockfolder/messa$in{'id'}.lock";
		&lock($lock_file,'MS');
		open(IN,"$chat_file");
		@chat_mes = <IN>;
		close(IN);

		$mes_sum = @chat_mes;

		if($mes_sum > $mes_max) { pop(@chat_mes); }

		unshift(@chat_mes,"$chara[0]<>$chara[4]<>$gettime<>$in{'mes'}<>$host<>$chara[18]<>\n");

		open(OUT,">$chat_file");
		print OUT @chat_mes;
		close(OUT);
		&unlock($lock_file,'MS');

	}
 --------------------------------------------------------------------------------------------------
 
 ǉ瓊[{^̂Ƃ
 <input type=hidden name=mode value=chat_message>
 A
 --------------------------------------------------------------------------------------------------
<input type=hidden name=chat_time value=1>
 --------------------------------------------------------------------------------------------------
 ㏑B


 쌠\

 regist.plJ

 FFA CHAT(ߍ) edit by <a href="http://www.net-soleil.com/" target="_blank">NET-SOLEIL</a>

 ȏǉĂB

 ݒu@
 ̐ǂɂOK
 sΌf